﻿using System.Windows;
using NUnit.Framework;
using Dsl.Ped.Common.Converters;

namespace DSLPedCommonTest.Converters
{
    [TestFixture, RequiresSTA]
    public class NullToVisibilityConverterTest
    {
        private NullToVisibilityConverter converter;

        [SetUp]
        public void SetUpForEachTest()
        {
            converter = new NullToVisibilityConverter();          
        }

        [Test, Description("Null to visibility")]
        public void NullToVisibilityTest1()
        {                                     
            var obj = converter.Convert(null, typeof(string), null, null );
            Assert.AreEqual(Visibility.Hidden, (Visibility)obj);
        }

        [Test, Description("Not null to visibility")]
        public void NullToVisibilityTest2()
        {
            var obj = converter.Convert(5, typeof(string), null, null);
            Assert.AreEqual(Visibility.Visible, (Visibility)obj);
        }
    }
}
